package com.whpost.api.controller.zhdt;

import com.whpost.api.utils.ApiUtils;
import com.whpost.service.entity.tools.ResultInfo;
import com.whpost.service.zhdt.service.DistrictJsonSaver;
import com.whpost.service.zhdt.service.ZhdtMainServices;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/zhdt/main")
public class ZhdtMainController {

    @Resource
    private ZhdtMainServices zhdtMainServices;

    /**
     * 数字网格
     * @return
     */
    @RequestMapping(value ="/init")
    public ResultInfo init(@RequestBody Map<String, Object> map){
        String loginId = ApiUtils.getLoginId();
        return zhdtMainServices.initMain(loginId,map);
    }

    /**
     * 保存城市区的范围
     * @return
     */
    @RequestMapping(value ="/save_qu")
    public ResultInfo saveQu(@RequestBody Map<String, Object> map){
        String loginId = ApiUtils.getLoginId();
        return zhdtMainServices.saveQu(loginId,map);
    }

    /**
     * 网点标注基础数据
     * @return
     */
    @RequestMapping(value ="/init_wdbz")
    public ResultInfo initWdbz(@RequestBody Map<String, Object> map){
        String loginId = ApiUtils.getLoginId();
        return zhdtMainServices.initWdbz(loginId,map);
    }
}
